// job-detailed-other.js
Page({
  data: {
    name: '',
    description: '',
    avatarSrc: '',
    followed: false,
    followText: '关注'
  },
  onLoad: function(options) {
    // 获取从上一个页面传递过来的参数
    const { name, description, avatarSrc } = options;
    this.setData({
      name,
      description,
      avatarSrc
    });
  },
  onFollowTap: function () {
    // 切换按钮状态
    this.setData({
      followed: !this.data.followed
    });

    // 更新按钮文字和样式
    if (this.data.followed) {
      this.setData({
        followText: '已关注'
      });
    } else {
      this.setData({
        followText: '关注'
      });
    }
  }
});
